package com.mini.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.*;
import java.util.Date;
import java.util.List;

/**
 * @author: zhaocg
 * @created: 2020/12/02 11:31
 */
@Data
@ApiModel(value = "业务组基本表")
@Entity
@NoArgsConstructor
@AllArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
public class BusinessGroupBase {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @ApiModelProperty(value = "业务组名称")
    private String groupName;

    @ApiModelProperty(value = "是否可用状态0-可用 1-不可用")
    private Integer states;

    @ApiModelProperty(value = "操作人ID")
    private Long operatorId;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    @Transient
    @ApiModelProperty(value = "业务范围列表")
    private List<BusinessRangeInfo> rangeInfoList;

    @Transient
    @ApiModelProperty(value = "所属组列表")
    private List<BusinessBelongingInfo> belongingInfoList;

    @Transient
    @ApiModelProperty(value = "是否存在更多业务范围数据 true-存在 false-不存在")
    private boolean rangeInfo;

    @Transient
    @ApiModelProperty(value = "是否存在更多所属组数据 true-存在 false-不存在")
    private boolean belongingInfo;

}
